<template>
  <div>
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="fenye.pagenum"
      :page-sizes="[3, 6, 9]"
      :page-size="fenye.pagesize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  name: "",
  components: {},
  props: ["total"],
  data() {
    return {
      fenye: {
        pagesize: 3,
        pagenum: 1,
      },
    };
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    handleSizeChange(size) {
      console.log(size);
      this.$emit("handleSizeChange", size);
      this.fenye.pagesize = size;
    },
    handleCurrentChange(page) {
      console.log(page);
      this.$emit("handleCurrentChange", page);
      this.fenye.pagenum = page;
    },
  },
};
</script>

<style lang='scss' scoped>
</style>
